package com.common.www.bean.entity.project;


import org.springframework.boot.base.jpa.domain.annotations.QueryCacheable;
import org.springframework.boot.base.jpa.domain.entity.NumberIdentityEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 高低压配电配置
 *
 * @param
 * @author andyliu
 * @date 5/28/2018 4:23 PM
 * @return
 */
@DynamicUpdate(true)
@DynamicInsert(true)
@Entity
@Getter
@Setter
@QueryCacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table()
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "高低压配电配置返回参数")
public class GdyBasic extends NumberIdentityEntity {

    /**
     * 参与项目
     */
    @JsonIgnoreProperties(value = {""})
    @ManyToOne()
    private Project project;
    /**
     * 高低压配电税率
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal pdShuiLv;
    /**
     * 居变个数T(最多20个)
     */
    @Column(length = 11)
    private Integer tCount;
    /**
     * 非居个数ZT(最多6个)
     */
    @Column(length = 11)
    private Integer ztCount;
    /**
     * 商业个数ST(最多4个)
     */
    @Column(length = 11)
    private Integer stCount;

}